﻿using Core;
using Core.Domain.Companys;
using System.Collections.Generic;

namespace Services.Companys
{
    public partial interface IJobService
    {
        /// <summary>
        /// 删除职位
        /// </summary>
        /// <param name="entity"></param>
        void DeleteJob(Jobs entity);

        /// <summary>
        /// 新增职位
        /// </summary>
        /// <param name="entity"></param>
        void InsertJob(Jobs entity);

        /// <summary>
        /// 更新职位
        /// </summary>
        /// <param name="entity"></param>
        void UpdateJob(Jobs entity);

        /// <summary>
        /// 根据主键获取职位实体信息
        /// </summary>
        /// <param name="jobId"></param>
        /// <returns></returns>
        Jobs GetJobById(int jobId);

        /// <summary>
        /// 根据主键集合获取职位实体信息
        /// </summary>
        /// <param name="jobIds"></param>
        /// <returns></returns>
        IList<Jobs> GetJobByIds(int[] jobIds);

        /// <summary>
        /// 获取所有职位信息
        /// </summary>
        /// <param name="active"></param>
        /// <param name="deleted"></param>
        /// <returns></returns>
        IList<Jobs> GetJobs(int companyId = 0, bool? active = true, bool? deleted = false);

        /// <summary>
        /// 获取所有职位信息（分页）
        /// </summary>
        /// <returns></returns>
        IPagedList<Jobs> GetJobs(string name = "", string url = "",
            int companyId = 0,
            int scaleId = 0, int cityId = 0,
            bool? active = true, bool? deleted = false,
            List<int> values = null,
            JobSortingEnum sort = JobSortingEnum.CreateUp, int pageIndex = 0, int pageSize = int.MaxValue);
    }
}
